home *** CD-ROM | disk | FTP | other *** search
- #define TRUE 1
- #define FALSE 0
- #define ERR (-1)
-
- #define UCHAR unsigned char
- #define SHORT short int
- #define UNSIG unsigned int
-
- #define SCR_X 80
- #define MAX_X 80
- #define MAX_Y 25
-
- #define DMYKAN 0xFE
- #define TABSIZ 8
- #define ESPSIZ 32
-
- typedef union {
- struct {
- SHORT es;
- SHORT ds;
- SHORT di;
- SHORT si;
- SHORT bp;
- SHORT sp;
- SHORT bx;
- SHORT dx;
- SHORT cx;
- SHORT ax;
- SHORT ip;
- SHORT cs;
- SHORT cf;
- } x;
- struct {
- SHORT _es;
- SHORT _ds;
- SHORT _di;
- SHORT _si;
- SHORT _bp;
- SHORT _sp;
- UCHAR bl,bh;
- UCHAR dl,dh;
- UCHAR cl,ch;
- UCHAR al,ah;
- SHORT _ip;
- SHORT _cs;
- SHORT _cf;
- } h;
- } REGSET;
-
- #define U_AX (regs->x.ax)
- #define U_AH (regs->h.ah)
- #define U_AL (regs->h.al)
- #define U_BX (regs->x.bx)
- #define U_BH (regs->h.bh)
- #define U_BL (regs->h.bl)
- #define U_CX (regs->x.cx)
- #define U_CH (regs->h.ch)
- #define U_CL (regs->h.cl)
- #define U_DX (regs->x.dx)
- #define U_DH (regs->h.dh)
- #define U_DL (regs->h.dl)
- #define U_DI (regs->x.di)
- #define U_SI (regs->x.si)
- #define U_DS (regs->x.ds)
- #define U_ES (regs->x.es)
- #define U_CF (regs->x.cf)
-
- typedef struct {
- SHORT cvram;
- SHORT kvram;
- SHORT cur_x;
- SHORT cur_y;
- SHORT cur_type;
- SHORT cur_off;
- SHORT cur_siz;
- UCHAR cur_flg;
- UCHAR com_mode;
- SHORT scr_y;
- SHORT color;
- SHORT bakcol;
- SHORT tabflg;
- SHORT odr_flg;
- SHORT kanmod;
- UCHAR bakch1;
- UCHAR kancod;
- SHORT extflg;
- SHORT esccnt;
- SHORT bak_x;
- SHORT bak_y;
- void (*extpro)();
- UCHAR tabmap[MAX_X/8];
- UCHAR escprm[ESPSIZ];
- } CONPARA;
-
- #define CVRAM (actv->cvram)
- #define KVRAM (actv->kvram)
- #define CUR_X (actv->cur_x)
- #define CUR_Y (actv->cur_y)
- #define CUR_TYPE (actv->cur_type)
- #define CUR_OFF (actv->cur_off)
- #define CUR_SIZ (actv->cur_siz)
- #define CUR_FLG (actv->cur_flg)
- #define COM_MODE (actv->com_mode)
- #define SCR_Y (actv->scr_y)
- #define COLOR (actv->color)
- #define BAKCOL (actv->bakcol)
- #define TABFLG (actv->tabflg)
- #define ODR_FLG (actv->odr_flg)
- #define KANMOD (actv->kanmod)
- #define BAKCH1 (actv->bakch1)
- #define KANCOD (actv->kancod)
- #define EXTFLG (actv->extflg)
- #define ESCCNT (actv->esccnt)
- #define BAK_X (actv->bak_x)
- #define BAK_Y (actv->bak_y)
- #define EXTPRO (actv->extpro)
- #define TABMAP (actv->tabmap)
- #define ESCPRM (actv->escprm)
-
- extern REGSET far *regs;
- extern CONPARA *actv;
- extern UCHAR ACT_DSP;
- extern SHORT CUR_OLD_XY;
- extern SHORT CUR_DISP_X;
- extern SHORT CUR_DISP_Y;
- extern SHORT CUR_DISP_OFF;
- extern SHORT CUR_DISP_SIZ;
- extern UCHAR CUR_DISP_FLG;